<!--
  @author yangjiangming
  @date 2018/11/26 10:00
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head>
    <title>线索录入</title>
    <th:block th:replace="common/common :: jscss"/>
</head>

<body>
<div class="layui-fluid new-order-page">
    <div class="layui-card">
        <form method="post" onkeydown="if(event.keyCode==13){return false}" action class="layui-form" lay-filter="zmn-order-add-form">
            <input type="hidden" name="longitude" id="longitude"/>
            <input type="hidden" name="latitude" id="latitude"/>
            <input type="hidden" name="countyId" id="countyId"/>
            <input type="hidden" name="countyName" id="countyName"/>
            <input type="hidden" id="district"/>
            <!--地址info-->
            <input type="hidden" id="streetSource" name="streetSource" value="0">
            <input type="hidden" id="communityId">
            <!--<div class="layui-card-header" style="margin-top:10px;"><b>基本信息</b></div>-->
            <div class="layui-split">&nbsp;</div>
            <div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <!-- 用户姓名 -->
                        <label class="layui-form-label">用户姓名</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <input class="layui-input"
                                   type="text"
                                   name="userName"
                                   lay-verify="required|username"
                                   placeholder="请输入姓名"
                                   autocomplete="off"
                                   maxlength="20"
                                   th:value="${orderInfo != null} ? ${orderInfo.userName}">
                        </div>
                    </div>
                    <!-- 联系电话 -->
                    <label class="layui-form-label layui-form-required">联系电话</label>
                    <div class="layui-input-inline" style="width: 200px;">
                        <!-- 联系电话1 -->
                        <input class="layui-input"
                               id="userPhone"
                               type="text"
                               value=""
                               name="userPhone"
                               lay-verify="required|tel"
                               placeholder="电话01"
                               autocomplete="off">
                    </div>
                </div>

                <!-- 下单渠道 -->
                <div class="layui-form-item">
                    <div class="layui-inline">

                        <label class="layui-form-label layui-form-required">下单渠道</label>
                        <div class="layui-input-inline" style="width: 525px;">
                            <select id="channelId" name="channelId" lay-verify="required" lay-filter="channelId" lay-search>
                                <option value=""></option>
                                <option th:each="channel : ${channelList}"
                                        th:value="${channel.value}"
                                        th:text="${channel.text}"
                                        th:disabled="${channel.disabled}">
                                </option>
                            </select>
                        </div>

                    </div>
                </div>
                <!-- 用户地址-省、市 -->
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">用户地址</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <select id="provinceId" name="provinceId"  lay-filter="province" lay-search>
                                <option value="">省</option>
                                <option th:each="province : ${provinceList}" th:value="${province.value}" th:text="${province.text}"></option>
                            </select>
                        </div>
                        <div class="layui-input-inline select-city">
                            <select id="cityId"
                                    name="cityId"
                                    lay-filter="city"
                                    lay-search>
                                <option value="">市</option>
                                <option th:selected="item.id==446000" th:each="item : ${cityList}" data-th-data-pid="${item.pid}" th:value="${item.value}" th:text="${item.text}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label" ></label>
                        <div class="layui-input-inline" id="street-wrapper" style="width: 525px;">
                            <input class="layui-input"
                                   id="customerAddress"
                                   type="text"
                                   name="street"
                                   placeholder="搜索地点，选择小区，街道，大厦..."
                                   autocomplete="off"
                                   maxlength="255"
                                   style="padding-right: 95px;">
                        </div>
                        <div id="suggestPanel" class="suggestPanelBox layui-anim layui-anim-upbit">
                            <ul></ul>
                        </div>
                    </div>
                </div>
                <!-- 用户地址-门牌 -->
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label"></label>
                        <div class="layui-input-inline input-large">
                            <input class="layui-input"
                                   type="text"
                                   name="address"
                                   maxlength="100"
                                   placeholder="请输入详细楼栋、门牌号"
                                   autocomplete="off">
                        </div>
                    </div>
                </div>
                <!-- 服务分类、订单类型 -->
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label ">服务分类</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <select id="servCategoryId" name="servCategId" lay-filter="servCategory" lay-search>
                                <option value="">全部</option>
                                <option th:each="item : ${servCategList}"
                                        th:value="${item.value}"
                                        th:text="${item.text}">
                                </option>
                            </select>
                        </div>
                        <label class="layui-form-label " >服务产品</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <select class="product-select"
                                    id="product"
                                    name="productId"
                                    lay-filter="product"
                                    lay-search>
                                <option value="">请选择</option>
                                <option th:each="item : ${servProductList}"
                                        th:value="${item.value}"
                                        th:text="${item.text}"
                                        data-th-data-unit="${item.ext1}"
                                        data-th-data-type="${item.type}"
                                        data-th-data-pid="${item.pid}">
                                </option>
                            </select>
                        </div>
                    </div>
                </div>

                <!-- 常见故障 -->
                <div class="layui-form-item" style="display: none">
                    <div class="layui-inline">
                        <label class="layui-form-label" >常见故障</label>
                        <div class="layui-input-block faults-wrapper" id="faults-wrapper"></div>
                    </div>
                </div>

                <!-- 自动外呼 -->
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label layui-form-required">自动外呼</label>
                        <div class="layui-input-inline layui-input-block" style="width: 212px;margin-left: 0px;">
                            <input type="radio"
                                   name="automatic"
                                   lay-verify="radio"
                                   th:each="item : ${automatic}"
                                   th:checked="${item.value == 1}"
                                   th:value="${item.value}"
                                   th:title="${item.text}">
                        </div>
                        <div class="layui-input-inline" style="width: 330px;">
                            <div style="color: #a9a9a9;margin-top: 7px;margin-left: -15px;">指：线索录入后，是否需要呼叫系统对用户自动外呼</div>
                        </div>
                    </div>
                </div>

                <!-- 下单备注 -->
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">备注信息</label>
                        <div class="layui-input-inline input-large">
                                <textarea class="layui-textarea"
                                          name="remark"
                                          maxlength="255"
                                          placeholder="最长不能超255个字"
                                          lay-verify="maxLenTo255"></textarea>
                        </div>
                    </div>
                </div>
                <!-- 按钮 -->
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button id="confirmbtn" style="margin-left: 15px;" type="button" class="layui-btn" lay-submit lay-filter="confirmbtn">保存</button>
                        <!--<button type="reset" class="layui-btn layui-btn-primary" >重置</button>-->
                    </div>
                </div>
                <div style="height: 1px"></div>
            </div>
        </form>
    </div>
</div>

<script th:inline="javascript">
    var json = {
        servProductList: [[${servProductList}]],
        cityList: [[${cityList}]]
    };

    layui.config({
        base: "/static/lay/",
        version: 20221013001
    }).extend({
        oms_call_add: "call/zmn.call.info.add"
    }).use(['index', 'oms_call_add']);
</script>

</body>
</html>